package com.imm.da.base

import android.os.Bundle
import androidx.annotation.LayoutRes
import androidx.fragment.app.Fragment
import com.imm.da.utils.LogHelper
import com.imm.da.utils.ToastHelper

/**
 * <p>------------------------------------------------------
 * <p> Copyright (C) 2021 zhangmz, All rights reserved.
 * <p> If there is technical discussion, you can contact zhangmz90@foxmail.com
 * <p>------------------------------------------------------
 * <p> des
 * <p>
 *
 * @author Created by Administrator
 * @date on 2021 2021/11/14 11:52
 */
open class BaseFragment(@LayoutRes val layoutId : Int) : Fragment(layoutId) {

    fun newInstance(bundle: Bundle?) : BaseFragment {
        arguments = bundle
        return this
    }

    fun toast(message : String){
        context?.let {
            ToastHelper.toast(it, message)
        }
    }

    fun log(message : String){
        LogHelper.v(message)
    }

}